from flask import Flask, render_template

from settings import Config, db
from article_read import article_read
from article_publish import article_publish
from home_page import home_page
from user_center import user_center

app = Flask(__name__, static_url_path='', static_folder='static')
app.secret_key = 'Your_secret_key&^52@!'
app.config.from_object(Config)
db.init_app(app)

app.register_blueprint(article_read, url_prefix='/')
app.register_blueprint(article_publish, url_prefix='/')
app.register_blueprint(home_page, url_prefix='/')
app.register_blueprint(user_center, url_prefix='/')

# @app.route('/')
# def hello_world():
#     return 'Hello World!'
# @app.route('/base')
# def base():
#     return render_template('base.html')

@app.route('/')
def test():
    return render_template('home.html')

# @app.route('/about')
# def about():
#     return render_template('article_read.html')

# @app.route('/publish')
# def publish():
#     return render_template('article_publish.html')

# @app.route('/user_center')
# def user_center():
#     return render_template('user_center.html')

# @app.route('/test')
# def base():
#     return render_template("mine.html")


if __name__ == '__main__':
    app.run()